package com.sinosoft.flow.web;

import com.sinosoft.flow.domain.po.SystemUser;
import com.sinosoft.flow.service.CacheService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: njz
 * @Description:
 * @Date: create in 2022/1/10 17:06
 */
@RestController
@RequestMapping("/api")
@Api(tags = "缓存测试")
public class CacheController {

    @Resource
    private CacheService cacheService;

    @ApiOperation("查询缓存")
    @GetMapping("/cache")
    public ResponseEntity<List<SystemUser>> getCache(){
        return ResponseEntity.ok(cacheService.findCache());
    }
}
